package com.freewater.springboot.demo.aop.advice.order.diffadvicetype;

import com.freewater.springboot.demo.aop.advice.order.SomeBusiness;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    // 同一个Aspect类文件中的不同Advice types作用到同一个join pint的顺序Spring 内定为：
    // @Around, @Before, @After, @AfterReturning, @AfterThrowing
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        applicationContext.registerShutdownHook();

        SomeBusiness someBusiness = applicationContext.getBean(SomeBusiness.class);
        someBusiness.doSomething("freewater");
    }
}
